<template>
  <view :style="DynamicHeight">
    <!-- 导航栏 -->
    <u-navbar :title="title" placeholder @leftClick="back" :border="false" :shadow="true"></u-navbar>

    <view class="container">
      <!-- 内容区域 -->
      <view class="apply-menu">
        <Attendancemanagement v-if="value1 == 0"></Attendancemanagement>
        <Attendancestatistics v-if="value1 == 1"></Attendancestatistics>

      </view>
    </view>
  </view>
</template>

<script setup>
import { onMounted, ref } from "vue";
import Attendancemanagement from '../component/Attendancemanagement/index.vue';
import Attendancestatistics from '../component/Attendancestatistics/index.vue';


const title = ref('考勤管理')
const value1 = ref(1)
let DynamicHeight = ref({})

const back = () => {
  uni.navigateBack({ delta: 1 });
}



onMounted(() => {
  let height = (uni.getSystemInfoSync().windowHeight || uni.getSystemInfoSync().screenHeight) || 0
  DynamicHeight.value = {
    height: `${height}px`,
    overflowY: 'hidden'
  }

})
</script>

<style lang="scss" scoped>
.container {
  // padding: 5px 0px;

  .apply-menu {
    width: 100%;
  }
}
</style>